package com.sk.cardeal.adapter;

import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sk.cardeal.R;
import com.sk.cardeal.entity.NewPartsList;
import com.sk.cardeal.entity.Parts;

import java.util.List;

/**
 * Created by sk on 2018/2/1.
 */

public class FixingPartsAdapter extends BaseQuickAdapter<NewPartsList.ResultListBean.PartsQualityListBean, BaseViewHolder> {

    public FixingPartsAdapter(int layoutResId, @Nullable List<NewPartsList.ResultListBean.PartsQualityListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, NewPartsList.ResultListBean.PartsQualityListBean item) {

        helper.setText(R.id.project_name, item.getPartsName())
                .setText(R.id.project_code, "OE码:" + item.getPartsOeCode())
                .setText(R.id.material_money, "￥" + item.getEditPrice())
                .setText(R.id.sure_num, "×" + item.getWantCount());
    }
}
